<?php



include("include/session.php");

//router
$module = $FZ_Url->get('module');
$module = $FZ_Url->seoUrl($module);
$op = $FZ_Url->get('op');

if($module == ''){
    $module = 'main';
}

$FZ_LOAD_MODULES = array('main', 'register', 'login');

foreach($FZ_LOAD_MODULES as $a => $b){
    $safename = $FZ_Url->seoUrl($b);
    ${'FZ_Modules_' . $safename} = new FZ_Modules($safename);
    
    if($module == $safename){
        ${'FZ_' . $safename} = new FZ_Controller($safename);
    }
    
    
}

//check class exists

    //check class
    if($module != ''){
        if($op){
            ${'FZ_'.$module}->$op();
        }else{
            ${'FZ_'.$module}->index();
        }
    }else{
        $FZ_main->index();
    }



?>